<?
    include_once('../classes/class.register.order.php');
    
    session_start();
    
    if (isset($_POST['addOrder']))
    {
        $registerOrder = new RegisterOrder();
        
        if($registerOrder->process())
        {
          echo "<script>loadMachines();</script>";
          echo "<script>alert('Orden de trabajo ingresada satisfactoriamente');</script>";
        }else
        {
          echo '<p class="error">';
          echo '<b>'.$registerOrder->show_errors().'</b>'; 
          echo '</p>';   
        }
    }
?>